home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / Alpha ƒ / Tcl / SystemCode / alphaDefinitions.tcl < prev    next >
Encoding:
Text File  |  2000-12-20  |  26.9 KB  |  750 lines

  1. ## -*-Tcl-*-
  2.  # ###################################################################
  3.  #  AlphaTcl - core Tcl engine
  4.  # 
  5.  #  FILE: "alphaDefinitions.tcl"
  6.  #                                    created: 00-12-18 17.00.44 
  7.  #                                last update: 12/20/2000 {14:30:44 PM} 
  8.  #  Author: Vince Darley
  9.  #  E-mail: <vince@santafe.edu>
  10.  #    mail: 317 Paseo de Peralta, Santa Fe, NM 87501
  11.  #     www: <http://www.santafe.edu/~vince/>
  12.  #  
  13.  # Reorganisation carried out by Vince Darley with much help from Tom 
  14.  # Fetherston, Johan Linde and suggestions from the Alpha-D mailing list.  
  15.  # Alpha is shareware; please register with the author using the register 
  16.  # button in the about box.
  17.  #  
  18.  # ###################################################################
  19.  ##
  20.  
  21. proc alpha::getDefinitions {} {}
  22.  
  23. namespace eval flag {}
  24. namespace eval global {}
  25.  
  26. ensureset tclvars {}
  27. ensureset allFlags {}
  28. ensureset allVars {}
  29. set invisibleModeVars(wordWrap) 1
  30.  
  31. proc flag::options {v} {
  32.     global flag::list
  33.     set thelist [set flag::list($v)]
  34.     set litems [lindex $thelist 1]
  35.     switch -- [lindex $thelist 0] {
  36.     "varitem" {
  37.         return [uplevel \#0 "set $litems"]
  38.     }
  39.     "varindex" {
  40.         return [uplevel \#0 "set $litems"]
  41.     }
  42.     "array" {
  43.         global $litems
  44.         return [lsort [array names $litems]]
  45.     }
  46.     }
  47.     return $litems
  48. }
  49.  
  50. # To fix the position of the status bar, click this box.||To allow dragging
  51. # of the status bar (usually at the bottom of the screen), click this box.
  52. newPref linkflag lockStatus 1
  53. # To scroll the horizontal scrollbar automatically to follow your typing, 
  54. # click this box||To enforce manual use of the horizontal scroll bar,
  55. # click this box.
  56. newPref linkflag autoHScroll 1
  57. # To save files automatically (except untitled buffers) every 'changesLim' 
  58. # changes, click this box||To disable the automatic saving of files, click
  59. # this box.
  60. newPref linkflag autoSave 0
  61. # To make the cursor blink, click this box||To stop the cursor blinking, 
  62. # click this box
  63. newPref linkflag blinkingCursor 1
  64. # To use a solid rectangular cursor, click this box||To use a thin vertical 
  65. # cursor, click this box.
  66. newPref linkflag blockCursor 0
  67. # To color words according to mode and context, click this box||To display all 
  68. # text more quickly, but in plain black and white, click this box.
  69. newPref linkflag coloring 1
  70. # To enable drag and drop editing using the mouse, click this box||To disable 
  71. # drag and drop editing using the mouse, click this box.
  72. newPref linkflag dragAndDrop 1
  73. # To display a horizontal scrollbar in new windows, click this box||To make 
  74. # maximum use of window space and not use a horizontal scrollbar, click this box.
  75. newPref linkflag horScrollBar 1
  76. # To enable clicking on hypertext items, click this box||To disable clicking
  77. # on hypertext items, click this box
  78. newPref linkflag hyperText 1
  79. # To force the insertion point to move with 'pageBack' and 'pageForward' 
  80. # commands, click this box||To leave the insertion point in place (usually 
  81. # offscreen) after 'pageBack' and 'pageForward' commands, click this box
  82. newPref linkflag moveInsertion 1
  83. # To list all file types (as opposed to just 'TEXT') in open/save dialog 
  84. # boxes, click this box||To display only 'TEXT' files in open/save dialog 
  85. # boxes, click this box.
  86. newPref linkflag openAllFiles 0
  87. # To make the window scroll dynamically while using vertical scrollbars, 
  88. # click this box||To make the window scroll only after releasing the button 
  89. # in a vertical scrollbar, click this box
  90. newPref linkflag powerThumb 1
  91. # Respect projector resources
  92. newPref linkflag projectorAware 1
  93. # To show all tabs, carriage returns, spaces etc with distinct symbols, 
  94. # click this box||To display whitespace characters normally, click this box.
  95. newPref linkflag showInvisibles 0
  96. # To use a small font for the various pop-up menus (e.g. marks menu), click this 
  97. # box||To use the standard system font for the popup menus, click this box.
  98. newPref linkflag smallMenuFont 1
  99. # if set, sorted is the default for function and section menus
  100. newPref linkflag sortedIsDefault
  101. # To allow tearing off of menus, click this box||To disable tearing-off of
  102. # menus, click this box
  103. newPref linkflag tearoffMenus 1
  104. # To enable Alpha's use of system temporary memory, click this box||To disallow
  105. # Alpha from using system temporary memory, click this box.
  106. newPref linkflag tempMem 1
  107. # To retain editing information to allow undo/redo operations, click this box||
  108. # To edit destructively (saving memory, and operating a little faster in, for 
  109. # example global replaces), click this box.
  110. newPref linkflag undoOn 1
  111. if {[info tclversion] >= 8.0 && ($tcl_platform(platform) == "macintosh")} {
  112. # To use shorter menus in which similar items are shown as a single item
  113. # which changes when you hold down 'option', 'control' etc, click this box||
  114. # To display all menu items
  115. # clearly, without the requirement for holding down 'option', 'control' 
  116. # etc, click this box.
  117. newPref linkflag useDynamicMenus 0 global ::alpha::buildMainMenus
  118. }
  119. # To automatically insert a carriage-return when you exceed a line
  120. # length of 'fillColumn' characters, click this box||To disable automatic
  121. # text wrapping, click this box.
  122. newPref linkflag wordWrap 1
  123. # To add a description of each preference to the standard dialogs, click this 
  124. # box||To use standard preference dialogs, with a 'Help' button to display
  125. # descriptions, click this box
  126. newPref flag includeDescriptionsInDialogs 0
  127. # To have completion routines ask you before deleting the current
  128. # selection, click this box.||To have completion routines automatically
  129. # delete any existing selection when performing completions, click this box.
  130. newPref flag askDeleteSelection 0
  131. # To force newly opened windows onto the main screen, click this box||To allow
  132. # new windows to be opened anywhere, including off screen, click this box.
  133. newPref flag forceMainScreen 1
  134. # To sort the items in the popup function menu '{}', click this box||To leave
  135. # the items in the popup function menu '{}' in the order in which they appear,
  136. # click this box.
  137. newPref flag sortFuncsMenu 1
  138. # To place two spaces after the '.' at the end of each sentence when
  139. # filling blocks of text, click this box|| To place only a single space
  140. # after the '.' at the end of each sentence when
  141. # filling blocks of text, click this box
  142. newPref flag doubleSpaces 1
  143. # To print a header at the top of each printed page, click this box||
  144. # To print only the contents of the window, without any identifying header,
  145. # click this box.
  146. newPref flag printHeader 1
  147. # To include a file's full path in the printed header, click this box
  148. # ||To place just a file's name in the printed header, click this box
  149. newPref flag printHeaderFullPath 0
  150. # To include the current time in printed headers, click this box
  151. # ||To remove the current time from printed headers, click this box
  152. newPref flag printHeaderTime 1
  153. # To choose from a listbox of possible completions if you try to 
  154. # complete a command for which no unique
  155. # suffix exists, click this box.||To abort the completion if no
  156. # unique suffix exists, click this box.
  157. newPref flag listPickIfMultCmps 1
  158. # if we have a choice between, say \left, \leftRight, \leftMore,
  159. # then we don't get stuck on '\left' with this option.
  160. newPref flag listPickIfNonUniqueStuckCmp 1
  161. # To clear old marks automatically when you select 'Mark File', 
  162. # click this box.||To check before clearing old marks, click this box.
  163. newPref flag quietlyClearMarks 1
  164. # To make Alpha beep when it asks you for something in the status bar, 
  165. # click this box.||To turn off the alert beep when using the status
  166. # bar, click this box.
  167. newPref flag promptNoisily 0
  168. # To prompt in the status bar if possible (rather than use a dialog),
  169. # click this box.||To use dialogs in preference to the status bar for
  170. # user input, click this box.
  171. newPref flag useStatusBar 0
  172. # When creating files for uploading through the Ftp menu, save them
  173. # with this eol format.  Note that some ftp clients may translate
  174. # eols for you as they up/download.
  175. newPref var createFtpType unix global "" "mac unix ibm"
  176. # Number of pixels from left edge of window to start of text
  177. newPref var horMargin 4
  178. # Alpha will visually indent code by this many characters to 
  179. # indicate its structure
  180. newPref var indentationAmount 4
  181. # If we have fewer than this many items in the opt-titlebar-menu,
  182. # add the contents of the current directory
  183. newPref var minItemsInTitlePopup 5
  184. # The tiling items in the 'Arrange' menu will relocate this many
  185. # windows, starting with the front window and moving back.
  186. newPref var numWinsToTile 2
  187. if {${alpha::platform} == "alpha"} {
  188. newPref var tileHeight [expr {$screenHeight - 60}]
  189. } else {
  190. newPref var tileHeight [expr {$screenHeight - 84 - $pixelOffsetFromBottomOfWindow}]
  191. }
  192. newPref var tileLeft 2
  193. newPref var tileMargin 22
  194. newPref var tileProportion .60
  195. if {![info exists locationOfStatusBar]} {
  196.     # To be used in Alpha(tk) 8
  197.     set locationOfStatusBar 0
  198. }
  199. newPref var tileTop [expr {40 + $locationOfStatusBar * 16}]
  200. newPref var tileWidth [expr {$screenWidth - 10}]
  201. # Default distance from left edge of screen to left edge of window.
  202. newPref linkvariable defLeft 2
  203. # Default distance from top edge of screen to top edge of window.
  204. newPref linkvariable defTop [expr {40 + $locationOfStatusBar * 16}]
  205. # Default window height
  206. newPref linkvariable defHeight $tileHeight
  207. # Default window width
  208. newPref linkvariable defWidth [expr {$tileWidth > 510 ? 510 : $tileWidth}]
  209. # The fraction of the screen the small batch-search, or diff-style 
  210. # windows use up.
  211. newPref var batchListWindowFraction 0.25 global win::SetProportions
  212. # The type of keyboard you have.  This influences some of the keyboard
  213. # shortcuts Alpha places in the menus, and is used for better setting
  214. # of user-defined key-bindings.
  215. newPref variable keyboard US global keys::keyboardChanged keyboards array
  216. # This dictates the spelling Alpha uses for words like 'Colour/Color'
  217. newPref var spelling 0 global "" "American British" index
  218. # Useful for debugging some complex startup problems; you can choose
  219. # between logging all errors for later viewing, or displaying them
  220. # immediately
  221. newPref var reportErrors 1 global "" \
  222.   [list "Log startup errors" "Report errors immediately"] index
  223. # re-read internet preferences from IC each startup
  224. newPref flag synchroniseWithInternetConfig 0
  225. # The font to use for printing documents
  226. newPref linkvariable printerFont "" global "" "system monaco courier geneva helvetica profont times {new york}"
  227. # The font-size to use for printing documents.
  228. newPref linkvariable printerFontSize "" global "" "7 9 10 12 14 18"
  229. if {$tcl_platform(platform) != "unix"} {
  230. # Default font to use for new windows
  231. newPref linkvariable defaultFont "monaco" global "" "system monaco courier geneva helvetica profont times {new york} programmer"
  232. # Default font size to use for new windows
  233. newPref linkvariable fontSize 9 global "" "7 9 10 12 14 18"
  234. } else {
  235. # Default font to use for new windows
  236. newPref linkvariable defaultFont "fixed" global "" "system fixed monaco courier geneva helvetica profont times {new york} programmer"
  237. # Default font size to use for new windows
  238. newPref linkvariable fontSize 10 global "" "7 9 10 12 14 18"
  239. }
  240. # The amount of information to store in the resource fork of saved text
  241. # files.  This can include font, tab, selection,... information.  Here, 'think' 
  242. # implies font, tab information, and 'mpw' adds window position and window
  243. # selection.
  244. newPref linkvariable savedState "" global "" "none think mpw"
  245. # The default size for a tab character for new windows (not the same as 
  246. # the amount of space used for visual indentation of code).
  247. # Alpha can be configured to remember tab sizes for previously edited documents
  248. # -- see 'savedState' for details.
  249. newPref linkvariable tabSize 8
  250. # Regexp used for automatic word wrapping
  251. newPref linkvariable wrapBreak {[\w_]+}
  252. # Regexp used for automatic word wrapping
  253. newPref linkvariable wrapBreakPreface {([^\w_])}
  254. # Auto-wrap if the user types further than this column
  255. newPref linkvariable wrapHigh ""
  256. # Auto-un-wrap if the user deletes chars so a line is shorter than this
  257. newPref linkvariable wrapLow ""
  258. # The maximum number of changes before auto-saving occurs (if set via the 
  259. # autoSave preference)
  260. newPref linkvariable changesLim ""
  261. # When wrapping text (see 'Word Wrap' preference), wrapping occurs
  262. # for any text beyond this column position.  Used by all 'Fill' routines
  263. newPref linkvariable fillColumn 75
  264. # Set to the regular expression that ALPHA uses to find function declarations.
  265. newPref linkvariable funcExpr {^[^ \t\(#\r/@].*\(.*\)$}
  266. # The parenthesised regexp block to use for the func name
  267. newPref linkvariable funcPar 1
  268. # Number of blanks left at beginning of lines by 'fill' routines.
  269. newPref linkvariable leftFillColumn 0
  270. # Alpha asks the user if wrapping should be done whenever the user opens 
  271. # files that have lines longer than 'paraColumn' characters
  272. newPref linkvariable paraColumn 180
  273. # Text column to use as the sort key when executing 'Sort Lines'.
  274. newPref linkvariable sortColumn 0
  275. # File to use for Tag searches.
  276. newPref linkio-file tagFile [file join $HOME cTAGS]
  277. # Margin size for printing
  278. newPref linkvariable leftMargin ""
  279. # Margin size for printing
  280. newPref linkvariable bottomMargin ""
  281. # Margin size for printing
  282. newPref linkvariable topMargin ""
  283. # Regular expression used to defines words for all internal operations.  Most
  284. # modes have their own definition of this variable.
  285. newPref linkvariable wordBreak {\w+}
  286. # Prepended to 'wordBreak' when looking backwards for a word.  Most
  287. # modes have their own definition of this variable.
  288. newPref linkvariable wordBreakPreface {(\W)}
  289. # Flags that won't appear in the menu.
  290. linkVar numLock
  291. # Usual place you use for downloading updates to Alpha and its packages.
  292. newPref var defaultAlphaDownloadSite "" global "" remote::site array
  293. # bug in alpha-IC interaction
  294. if {![catch "icGetPref DownloadFolder" res] && [file exists $res]} {
  295.     # Default download location for files from the internet
  296.     newPref var downloadFolder $res
  297. } else {
  298.     newPref var downloadFolder $HOME
  299. }
  300.  
  301. if {[info tclversion] >= 8.0 && $tcl_platform(platform) == "macintosh"} {
  302. # To use the newer 'Navigation Services' file open/save dialogs
  303. # if possible, click this box
  304. # ||To use the old 'Standard File Dialogs', click this box
  305. newPref flag useNavServices 0
  306. lunion flagPrefs(Appearance) useNavServices
  307. }
  308.  
  309. # if first item = code, then indent relative to code by given value of second arg
  310. # if first item = fixed, then force indentation to given level
  311. set indentationTypes [list "code 0" "code 4" "fixed 0"]
  312.  
  313. lunion flagPrefs(Backups)    undoOn autoSave
  314. lunion varPrefs(Backups)    changesLim
  315. lunion flagPrefs(Text)        hyperText doubleSpaces dragAndDrop    
  316. lunion varPrefs(Text)        fillColumn leftFillColumn paraColumn wrapLow \
  317.   wrapHigh sortColumn
  318. lunion flagPrefs(Appearance)    blinkingCursor blockCursor coloring \
  319.   showInvisibles smallMenuFont sortFuncsMenu tearoffMenus \
  320.   promptNoisily includeDescriptionsInDialogs quietlyClearMarks
  321. if {[info tclversion] >= 8.0 && ($tcl_platform(platform) == "macintosh")} {
  322.     lunion flagPrefs(Appearance) useDynamicMenus
  323. }
  324. lunion varPrefs(Appearance)    defaultFont fontSize tabSize 
  325. lunion flagPrefs(Printer)    printHeader printHeaderFullPath printHeaderTime
  326. lunion varPrefs(Printer)    bottomMargin printerFont printerFontSize \
  327.   topMargin leftMargin
  328. lunion flagPrefs(Tags)        
  329. lunion varPrefs(Tags)        funcPar tagFile
  330. lunion flagPrefs(Window)    autoHScroll forceMainScreen horScrollBar \
  331.   moveInsertion powerThumb sortedIsDefault lockStatus \
  332.   useStatusBar
  333. lunion varPrefs(Window)        defHeight defLeft defTop defWidth \
  334.   minItemsInTitlePopup savedState
  335. lunion flagPrefs(Tiling)        
  336. lunion varPrefs(Tiling)        numWinsToTile batchListWindowFraction horMargin \
  337.   tileHeight tileProportion tileLeft tileMargin tileTop tileWidth 
  338. lunion flagPrefs(Completions)    listPickIfMultCmps listPickIfNonUniqueStuckCmp \
  339.   askDeleteSelection
  340. lunion varPrefs(Completions)    
  341. lunion flagPrefs(Electrics)    
  342. lunion varPrefs(Electrics)    indentationAmount elecStopMarker
  343. lunion flagPrefs(Files) tempMem projectorAware openAllFiles
  344. lunion varPrefs(Files) 
  345. lunion "flagPrefs(Helper Applications)"
  346. lunion "varPrefs(Helper Applications)"
  347. lunion flagPrefs(WWW) synchroniseWithInternetConfig
  348. lunion varPrefs(WWW) defaultAlphaDownloadSite createFtpType downloadFolder \
  349.   browserSig ftpSig httpDownloadSig viewHtmlUsing
  350. lunion flagPrefs(International)
  351. lunion varPrefs(International) keyboard spelling 
  352. lunion flagPrefs(Packages)
  353. lunion varPrefs(Packages) 
  354. lunion flagPrefs(Errors)
  355. lunion varPrefs(Errors) reportErrors
  356.  
  357. proc alpha::addToPreferencePage {page args} {
  358.     global varPrefs flagPrefs allFlags
  359.     set vars [lremove -l $args $allFlags]
  360.     set flags [lremove -l $args $vars]
  361.     eval lunion varPrefs($page) $vars
  362.     eval lunion flagPrefs($page) $flags
  363. }
  364.  
  365. namespace eval indent {}
  366.  
  367. set indent::amounts [list "nothing" "half-tab" "tab"]
  368.  
  369. proc indent::setup {args} {
  370.     global indent_amounts indentationAmount
  371.     set indent_amounts(0) 0
  372.     set indent_amounts(1) [expr {$indentationAmount/2}]
  373.     set indent_amounts(2) $indentationAmount
  374.     set indent_amounts(-1) [expr {-$indentationAmount/2}]
  375.     set indent_amounts(-2) [expr {-$indentationAmount}]
  376. }
  377. indent::setup
  378. trace variable indentationAmount w indent::setup
  379.  
  380. proc getFileSig {f} {
  381.     getFileInfo $f arr
  382.     if {[info exists arr(creator)]} {
  383.     return $arr(creator)
  384.     } else {
  385.     return ""
  386.     }
  387. }
  388.  
  389. proc getFileType {f} {
  390.     getFileInfo $f arr
  391.     if {[info exists arr(type)]} {
  392.     return $arr(type)
  393.     } else {
  394.     return "TEXT"
  395.     }
  396. }
  397.  
  398. # get defaults from internet config
  399. if {$synchroniseWithInternetConfig} {
  400.     catch {set browserSig [getFileSig [icGetPref -t 1 Helperhttp]]}
  401.     catch {set ftpSig [getFileSig [icGetPref -t 1 Helperftp]]}
  402. } else {
  403.     catch {ensureset browserSig [getFileSig [icGetPref -t 1 Helperhttp]]}
  404.     catch {ensureset ftpSig [getFileSig [icGetPref -t 1 Helperftp]]}
  405. }
  406.  
  407. # The application signature of your internet browser
  408. newPref sig browserSig [expr {($tcl_platform(platform) == "macintosh") ? "MOSS" : "netscape"}]
  409. # The application signature of your ftp client
  410. newPref sig ftpSig Arch
  411. # The application signature of your internet browser to use for downloading
  412. # only (rather than viewing)
  413. newPref sig httpDownloadSig $browserSig
  414.  
  415. set "htmlViewer(Choose each time)" htmlChooseViewer
  416. set "htmlViewer(Browser)" file::openInDefault
  417. set "htmlViewer(Text-only parser)" wwwParseFile
  418.  
  419. if {${alpha::platform} == "alpha" && ![catch {nameFromAppl hbwr}]} {
  420.     set "htmlViewer(MacOS Help Viewer)" htmlHelpViewer
  421. }
  422.  
  423. # .html Help files can be opened in a local web browser or using Alpha's
  424. # parser.  This preference sets the default method for viewing such files.
  425. newPref var viewHtmlUsing "Choose each time" global "" htmlViewer array
  426.  
  427. # The application signature of your spell checker.  Excalibur is the
  428. # best spell checker for MacOS.
  429. newPref sig spellCheckSig XCLB
  430.  
  431. # The application signature of your stuffit expander
  432. newPref sig unstuffSig SITx
  433.  
  434. namespace eval win {}
  435.  
  436. proc win::SetProportions {} {
  437.     global tileHeight tileWidth tileTop tileLeft tileHeight \
  438.       errorHeight errorDisp tileMargin batchListWindowFraction
  439.     set errorHeight [expr {int ($batchListWindowFraction * ($tileHeight - $tileMargin))}]
  440.     set errorDisp [expr {int ((1- $batchListWindowFraction) * ($tileHeight - $tileMargin))}]
  441. }
  442.  
  443. proc wordWrapProc {val} { 
  444.     global mode wordWrap modifiedArrayElements 
  445.     global ${mode}modeVars
  446.     set wordWrap $val
  447.     set ${mode}modeVars(wordWrap) $val
  448.     lappend modifiedArrayElements [list wordWrap ${mode}modeVars]
  449. }
  450.  
  451.  
  452. proc toggleNumLock {} {
  453.     global numLock modifiedVars
  454.     
  455.     set numLock [expr {1 - $numLock}]
  456.     lappend modifiedVars numLock
  457. }
  458.  
  459. #============================================================================
  460. # declare these as modeVars in advance.  I'm not sure it is necessary (Vince)
  461. lunion modeVars funcExpr wrapBreakPreface wrapBreak wordBreakPreface wordBreak
  462.  
  463. # 'mode' is nothing when we start up.
  464. set mode        {}
  465. set lastMode        0
  466. set reverting        {}
  467.  
  468. # For quithook
  469. set modifiedVars    {}
  470. set modifiedArrVars     {}
  471. set modifiedModeVars    {}
  472. set modifiedArrayElements {}
  473.  
  474. namespace eval win {}
  475. ensureset win::Active ""
  476.  
  477. # Default settings of some global parameters (not preferences settings)
  478. # These will all be over-written by user-defs if set.
  479. set prefixString ">\ "
  480. set suffixString "\ <--"
  481. # mapping of windows to current modes.
  482. set win::Modes("") ""
  483. # keep count of number of dirty windows.
  484. set win::NumDirty 0
  485. set win::Current ""
  486. # For mark stack.
  487. set markName 0
  488. set markStack ""
  489. set winMenu "•263"
  490. set keyboard "U.S."
  491. set oldkeyboard ""
  492.  
  493. win::SetProportions
  494.  
  495. lunion ftpSigs Arch FTCh Woof
  496. lunion texSigs OTEX *TEX *XeT MPS*
  497. lunion browserSigs MOSS MSIE dogz OlG1 HTVW iCAB
  498. lunion httpDownloadSigs MOSS MSIE dogz OlG1 iCAB Geni Arch
  499. lunion tclshSigs WIsH TclL Geni
  500. lunion unstuffSigs SITx MV50
  501.  
  502. namespace eval keys {}
  503.  
  504. array set keys::specialProcs { 
  505.     "Next Stop" "ring::+"
  506.     "Next Stop Or Indent" "bind::IndentOrNextstop"
  507.     "Complete" "bind::Completion"
  508.     "Complete Or Tab" "bind::TabOrComplete"
  509.     "Prev Stop" "ring::-"
  510.     "Real Tab" "insertActualTab"
  511.     "nth Stop" "ring::nth"
  512.     "Clear All Stops" "ring::clear"
  513. }
  514.  
  515. array set keys::specialBindings {
  516.     "Complete" "<B/c"
  517.     "Prev Stop" "<U/c"
  518.     "Real Tab" "<I/c"
  519.     "nth Stop" ""
  520.     "Clear All Stops" "<U<B/c"
  521.     "Next Stop" ""
  522.     "Complete Or Tab" ""
  523.     "Next Stop Or Indent" "/c"
  524. }
  525.  
  526. # Note: the Mercutio MDEF can only handle icon-suite resources
  527. # with id's from 208 to 208+255 = 463.  Hence many of the little
  528. # icons which Alpha contains cannot appear in menus.  You could
  529. # of course do a little hacking....
  530. set alpha::_icons {
  531.     {DanR "Think Reference" 265}
  532.     {OTEX "OzTeX" 266}
  533.     {*TEX "TeXtures" 267}
  534.     {XXXX "LaTeX" 270}
  535.     {*XeT "CMacTeX" 272}
  536.     {TeX+ "DirectTeX Pro" 299}
  537.     {CWIE "Codewarrior" 268}
  538.     {dogz "Cyberdog" 281}
  539.     {Vbib "BibTeX" 282}
  540.     {SLab "Scilab" 283}
  541.     {IGR0 "Igor Pro" 284}
  542.     {JAVC "Apple Applet Viewer" 285}
  543.     {MOSS "Netscape Navigator" 293}
  544.     {MOSS "Netscape Communicator" 294}
  545.     {MSIE "Microsoft Internet Explorer" 295}
  546.     {OlG1 "MacLynx" 296}
  547.     {iCAB "iCab" 297}
  548.     {Woof "NetFinder" 298}
  549.     {DanR "Think Ref Viewer" 310}
  550.     {gsVR "Ghostview" 311}
  551.     {PnLF "Finger" 313}
  552.     {RZMI "MakeIndex" 314}
  553.     {FTCh "Fetch" 315}
  554.     {TGE+ "Tarmac" 316}
  555.     {Gzip "Gzip" 317}
  556.     {DStf "DropStuff" 318}
  557.     {SITx "StuffIt Expander" 319}
  558.     {ALTV "Programmer's Assistant" 400}
  559.     {MPAD "Mupad" 411}
  560.     {GPSE "Gnuplot" 415}
  561.     {Vodo "VOODOO" 500}
  562. }
  563.  
  564. namespace eval remote {}
  565.  
  566. ensureset "remote::site(Alpha's Home)" \
  567.   "ftp://alpha.olm.net/pub/packages/"
  568. ensureset "remote::site(Alpha's Upload site)" \
  569.   "ftp://alpha.olm.net/incoming/"
  570. ensureset "remote::site(Vince's Alpha-D site)" \
  571.   "ftp://ftp.ucsd.edu/pub/alpha/"
  572.  
  573. ensureset remote::listing {}
  574.  
  575. namespace eval keyboard {}
  576.  
  577.  
  578. set "keyboards(Australian)" {
  579.  {§1234567890-=[];'\`,./}
  580.  {±!@#$%^&*()_+{}:"|~<>?}
  581.  <U/[
  582.  <U/]
  583.  {'§' 0x0a '±' 0x0a}
  584. }
  585. set "keyboards(Brasil)" {
  586.  {§1234567890'+º´ç~\<,.-}
  587.  {±!"#$%&/()=?*ª`Ç^|>;:_}
  588.  <I<U/8
  589.  <I<U/9
  590.  {'§' 0x0a '±' 0x0a 'º' 0x21 'ª' 0x21 'ç' 0x29 'Ç' 0x29 '´' 0x1e '`' 0x1e '~' 0x27 '^' 0x27}
  591. }
  592. set "keyboards(British)" {
  593.  {§1234567890-=[];'\`,./}
  594.  {±!@£$%^&*()_+{}:"|~<>?}
  595.  <U/[
  596.  <U/]
  597.  {'§' 0x0a '±' 0x0a '£' 0x14}
  598. }
  599. set "keyboards(Canadian - CSA)" {
  600.  {/1234567890-=^ç;èàù,.é}
  601.  {\!@#$%?&*()_+¨Ç:ÈÀÙ'"É}
  602.  <I/7
  603.  <I/8
  604.  {'ç' 0x1e 'Ç' 0x1e 'è' 0x27 'È' 0x27 'à' 0x2a 'À' 0x2a 'é' 0x2c 'É' 0x2c 'ù' 0x32 'Ù' 0x32 '^' 0x21 '¨' 0x21 '7' 0x1a '8' 0x1c}
  605. }
  606. set "keyboards(Canadian - ISO)" {
  607.  {¬1234567890-=^ç;èàù,.é}
  608.  {°!"#$%?&*()_+¨Ç:ÈÀÙ'.É}
  609.  <I/7
  610.  <I/0
  611.  {'°' 0x0a '¬' 0x0a 'ç' 0x1e 'Ç' 0x1e 'è' 0x27 'È' 0x27 'à' 0x2a 'À' 0x2a 'é' 0x2c 'É' 0x2c 'ù' 0x32 'Ù' 0x32 '^' 0x21 '¨' 0x21 '7' 0x1a '0' 0x1d}
  612. }
  613. set "keyboards(Canadian - French)" {
  614.  {<1234567890-='[;`/¨,.é}
  615.  {>!@#$%?&*()_+"]:^|°<>ç}
  616.  <I/[
  617.  <I<U/[
  618.  {'é' 0x2c 'ç' 0x2c '¨' 0x06 '°' 0x06 '`' 0x27 '^' 0x27}
  619. }
  620. set "keyboards(Danish)" {
  621.  {$1234567890+´å¨æø'<,.-}
  622.  {§!"#€%&/()=?`Å^ÆØ*>;:_}
  623.  <I<U/8
  624.  <I<U/9
  625.  {'§' 0x0a '€' 0x15 'å' 0x21 'Å' 0x21 'æ' 0x29 'Æ' 0x29 'ø' 0x27 'Ø' 0x27 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  626. }
  627. set "keyboards(Dutch)" {
  628.  {§1234567890-=[];'\`,./}
  629.  {±!@#$%^&*()_+{}:"|~<>?}
  630.  <U/[
  631.  <U/]
  632.  {'§' 0x0a '±' 0x0a}
  633. }
  634. set "keyboards(Español - ISO)" {
  635.  {º1234567890'¡`+ñ´ç<,.-}
  636.  {ª!"·$%&/()=?¿^*ѨÇ>;:_}
  637.  <I/´
  638.  <I/ç
  639.  {'ç' 0x2a 'ñ' 0x29 'Ç' 0x2a 'Ñ' 0x29 '¡' 0x18 '¿' 0x18 'º' 0x0a 'ª' 0x0a '·' 0x14 '`' 0x21 '^' 0x21 '´' 0x27 '¨' 0x27}
  640. }
  641. set "keyboards(Finnish)" {
  642.  {§1234567890+´å¨öä'<,.-}
  643.  {°!"#€%&/()=?`Å^ÖÄ*>;:_}
  644.  <I<U/8
  645.  <I<U/9
  646.  {'§' 0x0a '°' 0x0a '€' 0x15 'å' 0x21 'ä' 0x27 'ö' 0x29 'Å' 0x21 'Ä' 0x27 'Ö' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  647. }
  648. set "keyboards(Flemish)" {
  649.  {@&é"'(§è!çà)-^$ù`<,;:=}
  650.  {#1234567890°_¨*%£>?./+}
  651.  <I/(
  652.  <I/)
  653.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  654. }
  655. set "keyboards(French)" {
  656.  {@&é"'(§è!çà)-^$ù`<,;:=}
  657.  {#1234567890°_¨*%£>?./+}
  658.  <I/(
  659.  <I/)
  660.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  661. }
  662. set "keyboards(French - numerical)" {
  663.  {@&é"'(§è!çà)-^$ù`<,;:=}
  664.  {#1234567890°_¨*%£>?./+}
  665.  <I/(
  666.  <I/)
  667.  {'é' 0x13 '(' 0x17 '§' 0x16 'è' 0x1a 'ç' 0x19 'à' 0x1d ')' 0x1b '°' 0x1b 'ù' 0x27 '^' 0x21 '¨' 0x21 '`' 0x2a '£' 0x2a}
  668. }
  669. set "keyboards(German)" {
  670.  {^1234567890ß´ü+öä#<,.-}
  671.  {°!"§$%&/()=?`Ü*ÖÄ^>;:_}
  672.  <I/8
  673.  <I/9
  674.  {'^' 0x0a '°' 0x0a '§' 0x14 'ü' 0x21 'ö' 0x29 'ä' 0x27 'Ü' 0x21 'Ö' 0x29 'Ä' 0x27 'ß' 0x1b '´' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  675. }
  676. set "keyboards(Italian)" {
  677.  {@&"'(çè)£àé-=ì$ù§<,;:ò}
  678.  {#1234567890_+^*%°>?./!}
  679.  <I/(
  680.  <I/)
  681.  {'(' 0x15 ')' 0x1a 'ç' 0x17 'è' 0x16 '£' 0x1c 'à' 0x19 'é' 0x1d 'ì' 0x21 'ù' 0x27 'ò' 0x2c '§' 0x2a '°' 0x2a}
  682. }
  683. set "keyboards(Norwegian)" {
  684.  {'1234567890+´å¨øæ@<,.-}
  685.  {§!"#$%&/()=?`Å^ØÆ*>;:_}
  686.  <I<U/8
  687.  <I<U/9
  688.  {'§' 0x0a 'å' 0x21 'æ' 0x27 'ø' 0x29 'Å' 0x21 'Æ' 0x27 'Ø' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  689. }
  690. set "keyboards(Spanish)" {
  691.  {[1234567890-=´`ñ;'<,.ç}
  692.  {]¡!#$%/&*()_+º¨Ñ:">¿?Ç}
  693.  <I<U/<
  694.  <U/[
  695.  {'¡' 0x12 '´' 0x21 'º' 0x21 'ñ' 0x29 'Ñ' 0x29 '¿' 0x2b 'ç' 0x2c 'Ç' 0x2c '`' 0x1e '¨' 0x1e}
  696. }
  697. set "keyboards(Swedish)" {
  698.  {§1234567890+´å¨öä'<,.-}
  699.  {°!"#€%&/()=?`Å^ÖÄ*>;:_}
  700.  <I<U/8
  701.  <I<U/9
  702.  {'§' 0x0a '°' 0x0a '€' 0x15 'å' 0x21 'Å' 0x21 'ä' 0x27 'Ä' 0x27 'ö' 0x29 'Ö' 0x29 '¨' 0x1e '^' 0x1e '´' 0x18 '`' 0x18}
  703. }
  704. set "keyboards(Swiss French)" {
  705.  {§1234567890'^è¨éà$<,.-}
  706.  {°+"*ç%&/()=?`ü!öä£>;:_}
  707.  <I/8
  708.  <I/9
  709.  {'§' 0x0a '°' 0x0a 'ü' 0x21 'è' 0x21 'ö' 0x29 'é' 0x29 'ä' 0x27 'à' 0x27 'ç' 0x15 '£' 0x2a '¨' 0x1e '!' 0x1e '^' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  710. }
  711. set "keyboards(Swiss German)" {
  712.  {§1234567890'^ü¨öä$<,.-}
  713.  {°+"*ç%&/()=?`è!éà£>;:_}
  714.  <I/8
  715.  <I/9
  716.  {'§' 0x0a '°' 0x0a 'ü' 0x21 'è' 0x21 'ö' 0x29 'é' 0x29 'ä' 0x27 'à' 0x27 'ç' 0x15 '£' 0x2a '¨' 0x1e '!' 0x1e '^' 0x18 '`' 0x18 '8' 0x1c '9' 0x19}
  717. }
  718. set "keyboards(U.S.)" {
  719.  {§1234567890-=[];'\`,./}
  720.  {±!@#$%^&*()_+{}:"|~<>?}
  721.  <U/[
  722.  <U/]
  723.  {'§' 0x0a '±' 0x0a}
  724. }
  725.  
  726. set "keyboards(Slovenian)" {
  727.   {“1234567890/+πËÊæ<,.-}
  728.   {”!"#$%&'()=?*©–»ΔÆ>;:_}
  729.   <U<I/π
  730.   <U<I/
  731.   {'“' 0x0a '”' 0x0a 'π' 0x21 '©' 0x21 '' 0x1e '–' 0x1e 'Ë' 0x29 '»' 0x29 'Ê' 0x27 'Δ' 0x27 'æ' 0x2a 'Æ' 0x2a}
  732. }
  733.  
  734. set "keyboards(Croatian)" {
  735.   {“1234567890/+‰∂ãçÏ<,.-}
  736.   {”!"#$%&'()=?*·≠âåÎ>;:_}
  737.   <U<I/‰
  738.   <U<I/∂
  739.   {'“' 0x0a '”' 0x0a '‰' 0x21 '·' 0x21 '∂' 0x1e '≠' 0x1e 'ã' 0x29 'â' 0x29 'ç' 0x27 'å' 0x27 'Ï' 0x2a 'Î' 0x2a}
  740. }
  741.  
  742. set "keyboards(Roman - JIS)" {
  743.   {§1234567890-^@[;:]`,./}
  744.   {±!"#$%&'()0=~`{+*}~<>?}
  745.  <U/[
  746.  <U/]
  747.  {'§' 0x0a '±' 0x0a}
  748. }
  749.  
  750.